<template>
  <div class="execution">
    <basic-container>
      <div style="margin-top: 10px">
        <el-table
          :data="list"
          border
          :header-cell-style="{ color: '#4D4D4D', background: '#fafafa' }"
        >
          <el-table-column label="商品">
            <template slot-scope="scope">
              <div style="display: flex; align-items: center">
                <img
                  :src="scope.row.pic"
                  style="width: 50px; height: 50px；margin-right: 20px"
                />
                <span>{{ scope.row.productName }}</span>
              </div>
            </template>
          </el-table-column>

          <el-table-column
            label="价格"
            align="center"
            prop="price"
          ></el-table-column>

          <el-table-column
            label="规格"
            align="center"
            prop="sku"
          ></el-table-column>
        </el-table>
      </div>
      <!-- <div class="pagination-container">
        <el-pagination
          background
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          layout="total, sizes,prev, pager, next,jumper"
          :page-size="listQuery.size"
          :page-sizes="[5, 10, 15]"
          :current-page.sync="listQuery.current"
          :total="total"
        >
        </el-pagination>
      </div> -->
    </basic-container>
  </div>
</template>
    
<script>
import "@/styles/index.scss";
import { giftProduct } from "@/api/marke/index";

export default {
  data() {
    return {
      listQuery: {
        // current: 1,
        // size: 10,
        giftId: null,
      },
      list: [],
      total: 0,
    };
  },
  filters: {
    statusFilters(value) {
      if (value === 1) {
        return "未支付";
      } else if (value === 2) {
        return "已支付";
      }
    },
  },
  created() {
    this.listQuery.giftId = this.$route.query.giftId;
    this.getList();
  },
  methods: {
    // handleSizeChange(val) {
    //   this.listQuery.size = val;
    //   this.getList();
    // },
    // handleCurrentChange(val) {
    //   this.listQuery.current = val;
    //   this.getList();
    // },
    getList() {
      giftProduct(this.listQuery).then((res) => {
        this.list = res.data.data;
        // this.total = res.data.data.total;
      });
    },
  },
};
</script>
    
